"""
XML namespaces related utils
"""

__author__    = "Adam Brodacki <abrodacki AT newterm.pl>"
__copyright__ = "Copyright (C) 2018 Newterm"


def add_szarp_xmlns(tag, ns_name=None):
	ns2uri = { None : 'http://www.praterm.com.pl/SZARP/ipk',
			'ipk':'http://www.praterm.com.pl/SZARP/ipk',
			'extra':'http://www.praterm.com.pl/SZARP/ipk-extra',
			'exec':'http://www.praterm.com.pl/SZARP/ipk-extra',
			'modbus':'http://www.praterm.com.pl/SZARP/ipk-extra',
			'checker':'http://www.praterm.com.pl/SZARP/ipk-checker',
			'icinga':'http://www.praterm.com.pl/SZARP/ipk-icinga'
	}
	uri = '{' + ns2uri[ns_name] + '}' + tag
	return uri
